<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="button" value="生成cookie" onclick="generateCookie()">
		<input type="button" value="获取cookie" onclick="getCookie()">
		<script>
			function generateCookie(){
				document.cookie = "color=red";
				document.cookie = "nick=jerry";
			}
			function getCookie(){
				alert(document.cookie);
			}
		</script>
	</body>
</html>
